﻿using UnityEngine;

public class RenderSystem
{
    public static void Action(Entity entity)
    {
        if (entity.render.gameObject != null )
        {
            if (entity.render != null && entity.position != null) {
                entity.render.gameObject.transform.position = new Vector3(((float)entity.position.pos.x) / 1000f, ((float)entity.position.pos.y) / 1000f, ((float)entity.position.pos.z) / 1000f);
                entity.render.gameObject.transform.eulerAngles = new Vector3(0, entity.position.rotaion, 0);
            }

            if (entity.scale != null)
            {
                entity.render.gameObject.transform.localScale = new Vector3(entity.scale.scale(), entity.scale.scale(), entity.scale.scale());
            }
        }
    }
}
